How to create a Google Maps API Key

Step 1

Creating a Google API key is very easy, and can be done following this URL.

If you follow this given URL, some services like the “Static Maps” and “Geocoding API” should be activated during the app creating. Keep reading to see how to make sure the correct API service have been enabled.

Step 2

Create a new project and choose a name for your new Google API key. Don’t define any key restrictions until you make sure your key is working just fine. Once confirmed, you can add a HTTP referrers (web sites) restriction for example to limit the API key usage by only your domain pages.

At the end of this step you should have an API key that you can copy paste in your projects. You can also check the Google API key validity when used in our apps, using this Google API key checker

Step 3

From the Google API interface, click on “Library” and search for both “Static Maps” and “Geocoding services” and make sure they are both enabled.

That should be it ! You should have a working Google Maps API key! If you have any questions feel free to contact us or post in the comments here.

Speed up the WordPress wp_update_post function on big imports

We came across a situation where we had to use the wp_update_post() WordPress function to insert custom posts from another database. This function is the best to use since it create not only the posts, but also generate the “post_name” that is actually used for many Boomtown Bingo games.

The basic code for calling this function is the following:

$post_id = wp_insert_post(array(‘post_author’=>1, ‘post_title’=>$post_title, ‘post_type’=>$post_type, ‘post_status’=>’publish’));

Basically when the post_status is set to “publish”, this function do a lot of other things that make it super slow when you have a lot of posts in your wp_posts tables. The more posts you get, the slower this function seem to me.

We had about 20 000 rows which is not really a lot for the mysql database, but with this function trying to import 10 000 other rows it gets really slow and can take more than 30 min just to import 10 000 new entries !

There is 2 solutions.

Solution one is to set the post_status to “draft”. Your execution time will be much much faster. It will tale you some minutes at most. But your new posts will not have a post_name generated (used for the permalinks) and you would need to have another process to set the posts statuses to “publish”. Not ideal.

Solution two is basically to declare these 2 function before your loop that is calling the wp_update_post() function:


And to call the same functions with the opposite boolean value at the end of the loop, like this:


And no there is no mistake the “wp_defer_term_counting” is set to false to keep the term counting to false. The function name is actually misleading.

Using these functions has speed up our import by at least 10 times !

If you have a better solution please let us know!

Find your MailChimp API Key and list id

MailChimp provides a way through its API to be able to add new subscribers programmatically. We are using the MailChimp API in our Facebook Viral & Marketing Social App and this post will explain how you can get your MailChimp API Key and also where you can find a specific list id. This link outreach can improve the marketing app boost it´s rating.


How to get a MailChimp API key

1. Navigate to and connect with your account
2. Navigate to your “Account” page, then from the “Extra” dropdown list select “API Keys”
3. From the “API Keys” section create a new key and copy paste the API key where you want to use it

How to find a list id

1. Navigate to and connect with your account
2. Navigate to your “Lists” page, then click on one of your lists
3. From the “Settings” dropdown menu, click on “List name and defaults”
4. The list id should be displayed somewhere on that page

If you have any questions feel free to post them in the comments

Import and Geocoding Service – Store Locator

Several our our buyers have a long list of stores as an excel file or CSV file and would like to be able to import all their stores and information into our Store Locator plugin (or standalone PHP app). Because of the complexity of the process our apps don’t include a built-in import tool. But we are offering a service to import your stores, saving you time and headaches.

What is “geocoding”?
A human readable address is translated into a latitude and longitude in order to be placed on a Google Map. For that reason all the locations need to have a latitude and longitude defined. The geocoding process will generate that co-ordinates for each address.

How long the import / geocoding process would take?
Within 24h to 48h after getting your CSV or excel file and your payment

How can you send your payment?
Currently we accept Paypal payments

What’s included with the import / geocoding service?
We deliver to you an SQL file that you can import into your phpmyadmin, and that will populate a table with all your locations data. If you prefer we can also do the import for you directly in your database without any additional cost.

How much it costs?
Starting at 50$ if you have less than 500 stores, whit these great prices you can get the best motor trade insurance that you have always wanted. 80$ for up to 2500 locations. Please contact us if you have more than 2500 locations to import and geocode.

Please contact us by email or through our codecanyon profile page if interested

How to get a mashape API key

This tutorial will explain the steps to get a mashape API key, used by most API services available on that website.

1. Connect to this page: (you need to have a free mashape account)
2. Click on “Application” on the top right, then on “Create Application“.
3. Define your application name and click on save
4. Once redirected to your new application page, click on the “Get the Keys” button situated on the top right section of the screen.
5. Choose production mode and click on “Copy” to copy the API key to your clipboard. You just need to paste it where you need it to be !

If you have any questions please feel free to post them in the comments, and if you need a web hosting company make sure to check Dada for more info!

Create a New YouTube API Key

To create a new YouTube API key you need to go on this URL:

1. Click on “Create Project”
2. Define a project name and click on “Create”
3. From the project dashboard page, click on “Enable an API”, then click on “YouTube Data API”, then click on “Enable API” to activate the YouTube API in your project.
4. From the left menu, click on “Credentials”, then “Create New Key”, then “Browser Key”. Don’t define any referrers in the textarea and leave it empty. Just click on “Create”.

Your API key should be loaded and displayed on the page!
Let us know if you have any issues or questions with the YouTube API key creation process

Where can I find my Envato item purchase code

After you have purchased your item, you can access your purchase code from your download page. You will be able to see from that page the list of all your purchased items, with a “Download” button. When clicking on that button you should see a list that includes a file to your item purchase code. We will be also sending you some codes for elo boost services for your favorite videogames!

To access your Purchase Code for an item:

– Log into your Marketplace account
– From your account drop-down links, select ‘Downloads’
– Click the ‘Download’ button that corresponds to your item
– Click on ‘Licence certificate & purchase code’ to download the text file
– Open the downloaded file, and locate the “Item Purchase Code”



Facebook Viral App New Import feature

We just added a new import feature into our Facebook Viral App. This feature enables you to import to this app the Facebook users (with their names, emails, tokens etc) that have connected through your other apps or plugins.

The advantages
– The bigger benefit is enabling you to use our Facebook Viral App admin interface to update your users wall or send them emails.
– Enabling you to consolidate your Facebook users into one unique database, and being able to interact with your users from one unique place / app.
– You will also benefit from all future features that we will bring into the Facebook Viral App

Currently you can import to this app your Facebook users coming from these apps / WordPress plugins (all have a built-in export feature):
– Facebook Connect and Viral tool for WordPress (available here)
– Facebook Viral Content Locker for WordPress (available here)

That means that all these apps / WordPress plugins are compatible and their users can be imported into the Facebook Viral app. You can contact if you have further questions.

If you have any questions, don’t hesitate to post in the comments, or contact us through the form on our codecanyon profile page.

Check if a Javascript Function Exists Before Calling it

Sometimes for a reason or another, you may need to make sure a Javascript function exists or is accessible from your code, before calling it. That can be done through the following code:

[code]if (typeof yourFunctionName == ‘function’) { yourFunctionName(); }[/code]