5 Websites to get icons completely free

icon-banner

As a web and application developer I need icons on my every project. Icons are copyrighted assets like images. I prefer to use kind of public domain graphics which are completely free for commercial purposes.

From where we can get completely free icons for web and graphic design?

Here are the 5 best websites to get icons for your graphic design projects.

Continue Reading

5 Free online infographic maker which are easy to use

infographic-banner

Infographic is the best way to represent your idea in proper way. It attracts all the visitors on your topic. You can use infographic on your blog, website, school project and business proposals.

How to design this infographic?

Common answer will be Photoshop or Gimp. But all these need designing skill and lots of time.

There are several online applications available now from where you can easily design your infographic with no graphical skill. Here are some of those websites listed below.

Continue Reading

How to convert MySQL collation from utf8mb4 to utf8

Recently I faced a tough situation with one of my WordPress site at the time of exporting MySQL database. My development MySQL server supports utf8mb4 collation but the production MySQL server does not support that. So, I had to convert all the tables of the MySQL database from  utf8mb4 to utf8.  The actual task was conversion from utf8mb4_unicode_ci to utf8_general_ci

I tried to convert manually several times but it did not work. My question was what is the difference between utf8mb4 and utf8?

utf8mb4 (as well as standard UTF-8) can directly store any character specified by Unicode; the former is fixed size at 4 bytes per character whereas the latter is between 1 and 4 bytes per character.

utf8 can only store the first 65,536 codepoints, which will cover CJVK (Chinese, Japanese, Vietnam, Korean), and use 1 to 3 bytes per character.

So, the real process will be ALTER the database as well as each database table to change the CHARACTER SET.  Using a PHP script I made the conversion and it worked perfectly. This is the PHP script which will convert your MySQL database collation from utf8mb4_unicode_ci to utf8_general_ci instantly. 

  1. Copy the above PHP script and paste in a file say, ‘dbconversion.php’.
  2. Now put this file in your server (development/production).
  3. Run this script from ‘yourdomain.com/dbconversion.php’.
  4. It’s all. It will convert everything and you will get a success message.

Note: If you are using WordPress website and you need to convert your database any time, make sure ‘utf8’ Charset will be defined in your ‘wp-config.php’ file as
define(‘DB_CHARSET’, ‘utf8’);

Continue Reading

Count your wordpress search results

The default WordPress search results page is noting but to show you the total results as per your search keywords. You can spice this page up a bit by showing the total search count like
4 Results found or something like this….

Just you need to add some codes and it will look like the image below.

The main code which do this action is:

<?php $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; ?>

Now what you will have to do is as follows.

Step 1: Open search.php page inside your theme folder. Remove the existing search query and put the following code.

Step 2: Save the file and check the updates doing some search.

If you are new to WordPress theme modification then make sure you will not basic WordPress template function like header, sidebar and footer as get_header(); get_sidebar(); and get_footer();

You can modify the code for style purpose or adding more ingredients on search.

Continue Reading

Get Latitude and Longitude from your Postal Address

We generally do not know the latitude and longitude of our area or any other area if we have needed to get the information. Sometimes we have to Google for getting this information. It is not a big issue to find out the approximate latitude  and longitude for any location and it can easily be done in PHP.

latitude-longitude

Here I am writing the procedures to do the same.

  1. Create a PHP page say ‘postal_lang_long.php’ .
  2. Put the following codes in the PHP file.
  3. Now place your PHP file in your web server and open the file in any browser.
  4. Now in your browser you can see a text box asking for the name of the place.
  5. Enter the place-name and hit ‘go’ button.
  6. That’s all, you will be shown the latitude and longitude of your location.
Continue Reading

Display your instagram image feed on your website

You like to add photos in your Instagram. How it would be if you can show your Instagram images on your webpage? It would be really nice. If you have basic HTML knowledge, you can implement that by following the 2 process mentioned below:

Step 1: First you need to authenticate your Instagram account and obtain user id and access token key.
User id: http://www.pinceladasdaweb.com.br/instagram/user-id/
Go to this URL and put your Instagram username and it will give your Instagram user id.
Access token key: http://www.pinceladasdaweb.com.br/instagram/access-token/
Go to this URL and login with your Instagram account, authenticate your login and it will give your Instagram access token key.

Step 2: Now paste the following code in your web page where you want to display your Instagram image feed.

In the above code put your Instagram user id, access token where it mentions (xxxx). Also, you can change the image dimension of the feed, you just need to edit the image height and width tag value.

Continue Reading

Setting up responsive image in WordPress

In current days maximum websites are getting converted to responsive – device friendly websites. If you have already converted your WordPress blog or website to responsive or will do, you may face some issues to transform your post images to responsive. Because, WordPress set image dimension (width & height) by default while you upload image from content editor or  from featured image box. There are simple ways to set your current WordPress images responsive without using any JavaScript or Plugin.

Step 1: Open functions.php file and add the filter code. It will restrict WordPress to add image dimension (width & height) while you upload next images via content editor or featured image box.

This code will not remove image dimension from the existing uploaded images. 

Step 2: Add the  CSS in your CSS file (style.css). This CSS will make the current all images to responsive. It does not matter if the images have hard coded dimension (width & height) or not.

Replace these class names ‘entry-content’, ‘comment-content’ with your absolute class names.

Continue Reading