Blogs

wordpress creating custom widget area

December 30, 2015
Today i have created a custom widget area in my theme. Thought of sharing it. Follow below two easy steps to enable it: 1) Add below lines of code to your theme functions.php file <?php /** * Register our sidebars and widgetized areas. * */ function arphabet_widgets_init() { register_sidebar( array( ...
Read more..

Bootstrap Event for modal, executing JS before modal popup

December 10, 2015
Bootstrap provide some event which can be hook on modal functionality. “show.bs.modal” is a event used to hook a function just befor a modal window popups. Below is an example how you can acheive this using “show.bs.modal”. //Comment Popop $("#ShowComment").on("show.bs.modal", function(e) { var questoinId = $(e.relatedTarget).data('questoinid'); $.ajax({ method: "POST", url: "<?php echo site_url()?>dashboard/get_comments/"+questoinId }) .done(function( msg ) { $("#commentTable").html(msg); }); }); //Comment Popop Below are some events available ...
Read more..

PHP 7 new features list

October 19, 2015
Today google about new enhancement and featured introduced in PHP 7 and found that PHP 7 is really having a lot of new functions and features with it. Here I am listing few of them which i found interesting. 1)The removal of ASP tags (<%) and script tags (<script language=php>) as a means of entering or ...
Read more..

override codeigniter native session

October 6, 2015
Struggling a lot with codigniter session issue. So I thought of using database for storing session but it did not solve my problem either (For Database approach click here ) than I thought of giving a try to have a library which override the codeigniter session class. Here I am sharing how to create library which ...
Read more..

Display multiple google map locations using latitude and longitude

September 28, 2015
Here i am sharing how you can show multiple location on google map using Google API latitude and longitude. create a html file as “index.html” and add below code your body tag. <script src="http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap" type="text/javascript"></script><script type="text/javascript">// <![CDATA[ var markers = [{"lat":"17.454000","lng":"78.434952"},{"title":"shilparamam","lat":"17.452665","lng":"78.435608","description":"Mumbai formerly Bombay, is the capital city of the Indian state of Maharashtra."},{"title":"image hospitals","lat":"17.452421","lng":"78.435715","description":"Pune is the seventh largest metropolis in India, ...
Read more..

Adding Google Marker using postal address

September 13, 2015
You can point market on google Map using specific address: create a html file as “index.html” and add below code:  <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>Geocoding service</title> <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"></script> <script> var geocoder; var map; function codeAddress() { var address = document.getElementById('address').value; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results.geometry.location); placeMarker(results.geometry.location,map); document.getElementById("latitude").value = ...
Read more..

Getting latitude and longitude from google maps api

August 12, 2015
As a client requirement I need to get latitude and longitude of the user on clicking of map. Google API is the best option which can be configure very easily into your application and easy to add/modify. So I thought of sharing so someone will get something out of it. Here I am sharing same code… Create HTML ...
Read more..

Finding nearest location using latitude and longitude.

August 12, 2015
Here I am explaining how you can find nearest latitude and longitude with user entered latitude and longitude. Here i am trying to search all nearby places by providing user location and distance from it. We can get the user location using my earlier article “How to get location on google Map“. Let create the a table ...
Read more..

Codeigniter storing session data in database

July 22, 2015
Due to the limitation of storing cookies in browser, we can not store bulk data in session. If we want to store more data we need to find the alternative. Codeigniter natively support storing session in database. You don’t need to do any change in code, just few configuration and it will start working fine. Here I ...
Read more..

Mysql varchar max length

July 7, 2015
Maximum data what we can store in varchar in mysql was 255. But after Mysql version 5.0.3 varchar can store maximum of 65,535 characters. But again this limit is having limitation of maximum row size which is 65535 bytes. It means including all columns it should be less than 65,535 bytes. Lets take an example as below: I ...
Read more..